//
//  CDataStore.h
//  HCHK_iphone
//
//  Created by yilong zhang on 11-12-10.
//  Copyright 2011年 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>

@interface CDataStore : NSObject

@property (nonatomic, assign) NSManagedObjectModel          *m_Model;
@property (nonatomic, assign) NSPersistentStoreCoordinator  *m_Persisten;
@property (nonatomic, assign) NSManagedObjectContext        *m_Context;

+(CDataStore*)DefaultDataManager;
+(void)DestoryDataManager;

-(id)initWithTypePath:(NSString*)type Path:(NSString*)path Name:(NSString*)name;

-(int)InsertNewRecord;
-(int)RemoveRecord:(NSManagedObject*)object;
-(int)UpadteRecord;

@end
